package com.inxedu.os.edu.service.modilmsg.impl;

import com.inxedu.os.edu.dao.EduMobilesendHistoryMapper;
import com.inxedu.os.edu.pojo.EduMobilesendHistory;
import com.inxedu.os.edu.pojo.EduMobilesendHistoryExample;
import com.inxedu.os.edu.pojo.EduMobilesendHistoryWithBLOBs;
import com.inxedu.os.edu.pojo.EduMobilesendHistorys;
import com.inxedu.os.edu.service.modilmsg.ModilMsgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ModilMsgServiceImpl implements ModilMsgService {

    @Autowired
    private EduMobilesendHistoryMapper eduMobilesendHistoryMapper;

    /**
     * 查询所有
     * @param eduMobilesendHistorys
     * @return
     */
    @Override
    public List<EduMobilesendHistorys> findModilMsg(EduMobilesendHistorys eduMobilesendHistorys) {


        List<EduMobilesendHistorys> eduMobilesendHistoryList = eduMobilesendHistoryMapper.findModilMsgByLike(eduMobilesendHistorys);

        return eduMobilesendHistoryList;
    }

    @Override
    public EduMobilesendHistorys findModilMsgById(Integer id) {
        EduMobilesendHistorys edu=eduMobilesendHistoryMapper.selectModilMsgById(id);


        return edu;
    }

    @Override
    public int deleteModilMsgById(Integer id) {
        int i = eduMobilesendHistoryMapper.deleteByPrimaryKey(id);

        return i;
    }

    @Override
    public int updateModilMsgById(EduMobilesendHistorys eduMobilesendHistorys) {

        int i=eduMobilesendHistoryMapper.updateModilByIdName(eduMobilesendHistorys);
        return i;
    }

    @Override
    public int insertMobSms(EduMobilesendHistoryWithBLOBs edu) {
        return eduMobilesendHistoryMapper.insert(edu);
    }
}
